Conversation
|
I think we could also do this same thing for Flow right? |
|
This looks really nice, @TylorS. I see what you're saying about lines 33 and below, but I have no idea how to gauge how painful it might be. I guess someone could be using a custom event or custom EventTarget. I certainly don't mind doing a major version bump. One strategy would be to include the potentially breaking changes, bump major, and then if it turns out to be prohibitive, loosen the types in a subsequent patch or minor release. Thoughts? Other options? As for Flow, yeah, I think the same approach should work. 👍. |
|
Yeah, moving back to I can try to add the corresponding flow types soon 👍 |
This PR tries to narrow down the type of
currentTargetwhen the node type is statically known. I think that line 33 and down may be a breaking change because it makes the type ofnodeno longer support allEventTargets but looking on MDN these are the places that implement these events. If it's preferred I can put that change into a separate PR to just get thecurrentTargetchanges merged before.